<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>robotide.action</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="robotide-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/robotframework-ride">RIDE</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="robotide-module.html">Package&nbsp;robotide</a> ::
        Package&nbsp;action
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package action</h1><p class="nomargin-top"><span class="codelink"><a href="robotide.action-pysrc.html">source&nbsp;code</a></span></p>
<p>Module for handling UI actions.</p>
<div class="rst-contents rst-local rst-topic" id="rst-contents">
<ul class="rst-simple">
<li><a class="rst-reference internal" href="#rst-introduction" id="rst-id1">Introduction</a></li>
<li><a class="rst-reference internal" href="#rst-registering-actions" id="rst-id2">Registering actions</a><ul>
<li><a class="rst-reference internal" href="#rst-menu-separators" id="rst-id3">Menu separators</a></li>
<li><a class="rst-reference internal" href="#rst-registering-multiple-actions" id="rst-id4">Registering multiple actions</a></li>
</ul>
</li>
<li><a class="rst-reference internal" href="#rst-handling-actions" id="rst-id5">Handling actions</a></li>
</ul>
</div>
<div class="rst-section" id="rst-introduction">
<h1 class="heading"><a class="rst-toc-backref" href="#rst-id1">Introduction</a></h1>
<p>This module is used both by the core application and plugins to create and
register menu entries, toolbar buttons and keyboard shortcuts. All these are
created using the <a href="robotide.action.actioninfo.ActionInfo-class.html" class="link">ActionInfo</a> and <a href="robotide.action.actioninfo.SeparatorInfo-class.html" class="link">SeparatorInfo</a> classes.</p>
</div>
<div class="rst-section" id="rst-registering-actions">
<h1 class="heading"><a class="rst-toc-backref" href="#rst-id2">Registering actions</a></h1>
<p>Actions are registered by creating an instance of the <a href="robotide.action.actioninfo.ActionInfo-class.html" class="link">ActionInfo</a> class with
the needed data. After configuring the instance it can be registered. The core
application handles registration itself, but plugins should always use the
<a href="robotide.pluginapi.plugin.Plugin-class.html#register_action" class="link">pluginapi.Plugin.register_action</a> method.</p>
<div class="rst-section" id="rst-menu-separators">
<h2 class="heading"><a class="rst-toc-backref" href="#rst-id3">Menu separators</a></h2>
<p>Menu separators are created using instances of the <a href="robotide.action.actioninfo.SeparatorInfo-class.html" class="link">SeparatorInfo</a> class.
They must be registered using the same methods as the <a href="robotide.action.actioninfo.ActionInfo-class.html" class="link">ActionInfo</a> instances.</p>
</div>
<div class="rst-section" id="rst-registering-multiple-actions">
<h2 class="heading"><a class="rst-toc-backref" href="#rst-id4">Registering multiple actions</a></h2>
<p>If there is a need to create a larger number of actions, it might be convenient
to use a simple DSL understood by the <a href="robotide.action.actioninfo-module.html#ActionInfoCollection" class="link">ActionInfoCollection</a> factory method.
This factory creates a list containing <a href="robotide.action.actioninfo.ActionInfo-class.html" class="link">ActionInfo</a> and <a href="robotide.action.actioninfo.SeparatorInfo-class.html" class="link">SeparatorInfo</a> objects
which can be registered in a one go.</p>
</div>
</div>
<div class="rst-section" id="rst-handling-actions">
<h1 class="heading"><a class="rst-toc-backref" href="#rst-id5">Handling actions</a></h1>
<p>When any of the registered user actions is executed, RIDE decides which
registered event handlers should be called. It is possible to register a handler
globally or so that it is called only when the plugin is considered active
(i.e. it has focus).</p>
<p>The registering mechanism allows multiple handlers to be registered to the same
menu entry, toolbar button, or shortcut. It is thus possible that, for example,
one keyboard shortcut calls multiple handlers.</p>
<p>It is also possible to enable/disable action's menu entry, toolbar button,
and shortcut by enabling/disabling those with <a href="robotide.action.action.Action-class.html#enable" class="link">action.Action.enable</a> and
<a href="robotide.action.action.Action-class.html#disable" class="link">action.Action.disable</a> methods. Action is returned by
<a href="robotide.pluginapi.plugin.Plugin-class.html#register_action" class="link">pluginapi.Plugin.register_action</a> method.</p>
</div>

<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Submodules</span></td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="robotide.action.action-module.html">robotide.action.action</a></strong>    </li>
    <li> <strong class="uidlink"><a href="robotide.action.actioninfo-module.html">robotide.action.actioninfo</a></strong>    </li>
    <li> <strong class="uidlink"><a href="robotide.action.shortcut-module.html">robotide.action.shortcut</a></strong>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Variables</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="robotide.action-module.html#__package__" class="summary-name">__package__</a> = <code title="'robotide.action'"><code class="variable-quote">'</code><code class="variable-string">robotide.action</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<p class="indent-wrapped-lines"><b>Imports:</b>
  <a href="robotide.action.actioninfo-module.html#ActionInfoCollection" title="robotide.action.actioninfo.ActionInfoCollection">ActionInfoCollection</a>,
  <a href="robotide.action.actioninfo.SeparatorInfo-class.html" title="robotide.action.actioninfo.SeparatorInfo">SeparatorInfo</a>,
  <a href="robotide.action.actioninfo.ActionInfo-class.html" title="robotide.action.actioninfo.ActionInfo">ActionInfo</a>,
  <a href="robotide.action.action-module.html#ActionFactory" title="robotide.action.action.ActionFactory">ActionFactory</a>,
  <a href="robotide.action.action-module.html" title="robotide.action.action">action</a>,
  <a href="robotide.action.actioninfo-module.html" title="robotide.action.actioninfo">actioninfo</a>,
  <a href="robotide.action.shortcut-module.html" title="robotide.action.shortcut">shortcut</a>
</p><br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Variables Details</span></td>
</tr>
</table>
<a name="__package__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">__package__</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">robotide.action</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="robotide-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/robotframework-ride">RIDE</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Apr 13 15:09:36 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
